<template>
  <div>
    <el-scrollbar>
      <el-menu @select="handleSelect">

        <el-menu-item index="home" default-active >
          <!-- <RouterLink to="/"> -->
          <el-icon>
            <document />
          </el-icon>
          <span>启动脚本</span>
          <!-- </RouterLink> -->
        </el-menu-item>



        <el-menu-item index="log">
          <!-- <RouterLink to="/about"> -->
            <el-icon><View /></el-icon>
          <span>日志</span>
          <!-- </RouterLink> -->
        </el-menu-item>

        <el-menu-item index="about">
          <!-- <RouterLink to="/about"> -->
          <el-icon>
            <Avatar />
          </el-icon>
          <span>关于</span>
          <!-- </RouterLink> -->
        </el-menu-item>
        
      </el-menu>
    </el-scrollbar>

  </div>
</template>

<script>
export default {
  name: 'Navbar',
  methods: {
    handleSelect(key) {
      //切换主窗口的组件
      this.$router.push({ path: `/${key}` });
    }
  }
}
</script>